﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Agresso.Interface.Layer.SQL
{
    public class GradeAccountMappingSQL
    {
        public static string InsertGradeAccountMapping()
        {
            return @"
            INSERT INTO [i_grade_account_mapping]
           ([grade]
           ,[account]
            ,[account_grn]
           ,[created_date]
           ,[modified_date])
     VALUES
           (@grade
           ,@account
            ,@account_grn
           ,@created_date
           ,@modified_date
            )";
        }
        public static string UpdateGradeAccountMapping()
        {
            return @"
           UPDATE [i_grade_account_mapping] SET
           [grade] = @grade
           ,[account] = @account
            ,[account_grn] = @account_grn
           ,[modified_date] = @modified_date
             WHERE gam_id = @gam_id";
        }
        public static string GetGradeAccountMappingByName()
        {
            return @"select * from i_grade_account_mapping where grade=@grade ";
        }
        public static string GetGradeAccountMappingByAccount()
        {
            return @"select * from i_grade_account_mapping where account=@account ";
        }
        public static string GetAllGradeAccountMapping()
        {
            return @"select * from i_grade_account_mapping order by grade";
        }
        //public static string GetAllSoftmarGradeAccount()
        //{
        //    return @"select distinct type grade from OpCharge order by 1";
        //}
    }
}
